package com.example.mobile2121606109ycg0321;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class RegisterActivity extends AppCompatActivity {

    private TextView tvMainTitle1;
    private EditText edtTxtMainAccount;
    private EditText edtTxtMainPSW;
    private EditText edtTxtMainRePSW;
    private Button btnMainRegister;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        initView();
        btnMainRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String account = edtTxtMainAccount.getText().toString();
                String psw = edtTxtMainPSW.getText().toString();
                String rePsw = edtTxtMainRePSW.getText().toString();

                Log.i("TAG", "账号："+account+"，密码："+psw+"，在输入密码："+rePsw);
            }
        });
    }

    private void initView() {
        tvMainTitle1 = (TextView) findViewById(R.id.tvMainTitle1);
        edtTxtMainAccount = (EditText) findViewById(R.id.edtTxtMainAccount);
        edtTxtMainPSW = (EditText) findViewById(R.id.edtTxtMainPSW);
        edtTxtMainRePSW = (EditText) findViewById(R.id.edtTxtMainRePSW);
        btnMainRegister = (Button) findViewById(R.id.btnMainRegister);
    }
}